import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'state.dart';

class GuideLogic extends GetxController {
  final GuideState state = GuideState();
  PageController pageController = PageController();

  @override
  void onReady() {
    super.onReady();
  }

  /// 切换到下一页
  void startGuide() {
    state.currentPageIndex.value = state.currentPageIndex.value + 1;
    pageController.animateToPage(
      state.currentPageIndex.value,
      duration: const Duration(milliseconds: 300),
      curve: Curves.easeInOut,
    );
  }

  @override
  void onClose() {
    super.onClose();
  }

}
